<?php

namespace app\admin\controller;

use app\common\Helpers\Result;
use think\captcha\facade\Captcha;
use think\Request;

// 组织架构
class MenuController
{

    public function index(Request $request)
    {
        if($request->isPost()){
            $params = $request->post();
            $data = [
                [
                    'id' => 1,
                    'pid' => 0,
                    'name' => '系统管理',
                    'title' => '系统管理',
                    'icon' => 'fa fa-cog',
                    'sort' => 1,
                    'status' => '1',
                    'is_refresh' => '0',
                    'target' => '0',
                    'perms' => 'admin:system:index',
                    'create_time' => '2021-03-09 09:54:45',
                    'update_time' => '2021-03-09 09:54:45',
                    'note' => '系统管理',
                    'type' => 'M',
                    'url' => ''
                ],
            ];
            return Result::success('', $data, ['total' => 2]);
        }else{
            return view();
        }
    }
}